<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="SocketHTTPFileRequest,code.google.as3httpclient.SocketHTTPFileRequest,fileName,dataField,fileContent,__constructData" name="keywords">
<title>code.google.as3httpclient.SocketHTTPFileRequest</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'SocketHTTPFileRequest - AS3HTTPClient documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3HTTPClient documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?code/google/as3httpclient/SocketHTTPFileRequest.html&amp;code/google/as3httpclient/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;SocketHTTPFileRequest</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class SocketHTTPFileRequest"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">code.google.as3httpclient</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class SocketHTTPFileRequest</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">SocketHTTPFileRequest <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
</table>
<p></p>
  This type of request allows you to upload a file using the SocketURLLoader.
  
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="SocketURLLoader.html" target="">SocketURLLoader</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProperty" id="hideInheritedProperty">
<a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Properties</a>
</div>
<div class="showInheritedProperty" id="showInheritedProperty">
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#baseURL">baseURL</a> : String<div class="summaryTableDescription">
   Gives the baseURL from the url, this could be seen as the server name.<br />
   <br />
   <code>http://www.mywebsite.com:8080/test/?id=100</code> will result in <code>www.mywebsite.com</code>
   as base url.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#contentType">contentType</a> : String<div class="summaryTableDescription">
   The contentType of the request, the default value is ContentType.APPLICATION_X_WWW_FORM_URLENCODED
   
   </div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#data">data</a> : Object<div class="summaryTableDescription">
   The given data will be handled differently depending on a few variables.<br />
   <br />
   If method is set to POST and contentType is set to ContentType.APPLICATION_X_WWW_FORM_URLENCODED:
   If data is ByteArray it will be written as is to the request, else the toString() method will 
   be called and the result will be written to the request.<br />
   <br />
   If method is set to POST and contentType is set to ContentType.MULTIPART_FORM_DATA:<br />
   If data is URLVariables it will create a part for each entry.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#dataField">dataField</a> : String<div class="summaryTableDescription">
   The name of the form field that should contain the data
   </div>
</td><td class="summaryTableOwnerCol">SocketHTTPFileRequest</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#extendedURL">extendedURL</a> : String<div class="summaryTableDescription">
   Gives the extendedURL from the url, this is all extra information besides the
   server and port<br />
   <br />
   <code>http://www.mywebsite.com:8080/test/?id=100</code> will result in <code>/test/?id=100</code>
   as extended url.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#fileContent">fileContent</a> : ByteArray<div class="summaryTableDescription">
   The actual file data.</div>
</td><td class="summaryTableOwnerCol">SocketHTTPFileRequest</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#fileName">fileName</a> : String<div class="summaryTableDescription">
   The name of the file you are uploading
   </div>
</td><td class="summaryTableOwnerCol">SocketHTTPFileRequest</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#method">method</a> : String<div class="summaryTableDescription">
   The method of the request.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#port">port</a> : int<div class="summaryTableDescription">
   Gives the port from the URL
   </div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#requestHeaders">requestHeaders</a> : Array<div class="summaryTableDescription">
   The request headers to be included in the request.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="SocketHTTPRequest.html#url">url</a> : String<div class="summaryTableDescription">
   The url of the request.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#SocketHTTPFileRequest()">SocketHTTPFileRequest</a>(url_str:String = null)</div>
<div class="summaryTableDescription">
   Defaults the method to URLRequestMethod.POST and the contentType to
   ContentType.MULTIPART_FORM_DATA
   
   </div>
</td><td class="summaryTableOwnerCol">SocketHTTPFileRequest</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="SocketHTTPRequest.html#constructRequest()">constructRequest</a>():ByteArray</div>
<div class="summaryTableDescription">
   This method will construct the request and return it as a ByteArray.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="SocketHTTPRequest.html#createInstanceFromURLRequest()">createInstanceFromURLRequest</a>(request:URLRequest):<a href="../as3httpclient/SocketHTTPRequest.html">SocketHTTPRequest</a>
</div>
<div class="summaryTableDescription">[static]
   Will create an instance of SocketHTTPRequest from the given URLRequest.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedMethod" id="hideInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(false,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Methods</a>
</div>
<div class="showInheritedProtectedMethod" id="showInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(true,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Methods</a>
</div>
</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#__constructData()">__constructData</a>(boundary_str:String):ByteArray</div>
<div class="summaryTableDescription">
   Will construct the data containing the file information.</div>
</td><td class="summaryTableOwnerCol">SocketHTTPFileRequest</td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="SocketHTTPRequest.html#__constructHeader()">__constructHeader</a>(contentLength_num:Number, boundary_str:String):ByteArray</div>
<div class="summaryTableDescription">
   This method constructs the header of the request.</div>
</td><td class="summaryTableOwnerCol"><a href="SocketHTTPRequest.html">SocketHTTPRequest</a></td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="dataField"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dataField</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var dataField:String</code><p>
   The name of the form field that should contain the data
   </p></div>
<a name="fileContent"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fileContent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var fileContent:ByteArray</code><p>
   The actual file data.
   </p></div>
<a name="fileName"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fileName</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var fileName:String</code><p>
   The name of the file you are uploading
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="SocketHTTPFileRequest()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SocketHTTPFileRequest</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function SocketHTTPFileRequest(url_str:String = null)</code><p>
   Defaults the method to URLRequestMethod.POST and the contentType to
   ContentType.MULTIPART_FORM_DATA
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url_str</span>:String</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="ContentType.html" target="">ContentType</a>
</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="__constructData()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">__constructData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected override function __constructData(boundary_str:String):ByteArray</code><p>
   Will construct the data containing the file information.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">boundary_str</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>ByteArray</code></td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash; if one of the following fields is empty: fileName, dataField, fileContent
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20"></td><td><code></code> &mdash; is the data is not of type URLVariables
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20"></td><td><code></code> &mdash; if the content type and method are not ContentType.MULTIPART_FORM_DATA and
        URLRequestMethod.POST
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="SocketHTTPRequest.html#data" target="">SocketHTTPRequest.data</a>
</div>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
